/* eslint-disable vue/require-prop-types */
/**
* @Description:污染物排放地图展示
* @author NewLore1
* @Date 2021/06/30/10:51
* @LastEditors: 乔
* @LastEditTime: 2021/06/30/10:51
**/
<template>
  <!-- 弹框 -->
  <el-dialog v-el-drag-dialog :visible.sync="modalCfg.visible" :close-on-click-modal="false" :width="width" append-to-body>
    <div v-if="isHeader" slot="title">
      {{ modalCfg.title }}
    </div>
    <slot />

    <div
      v-if="isHandle"
      slot="footer"
      :style="{'text-align':textaLign}"
    >
      <!--      :style="{'color':status === true ? '#FF5757':'#757575'}"-->

      <!--        style="text-align:center"-->
      <!-- 操作底部 -->
      <el-button
        v-for="item in modalCfg.handles"
        v-show="item.isShow==='show'||!item.isShow"
        :key="item.label"
        :plain="item.plain"
        :loading="item.loading"
        :type="item.type"
        :icon="item.icon"
        :size="item.size"
        :disabled="item.disabled"
        @click="item.handle(that)"
      >{{ item.label }}</el-button>
    </div>
  </el-dialog>
</template>

<script>

export default {
  props: {
    that: { type: Object, default: this },
    modalCfg: {
      type: Object,
      // eslint-disable-next-line vue/require-valid-default-prop
      default: {
        visible: false,
        title: '',
        handles: []
      }
    },
    width: {
      type: String,
      default: '50%'
    },
    center: {
      type: Boolean,
      default: true
    },
    isHeader: {
      type: Boolean,
      default: true
    },
    isHandle: {
      type: Boolean,
      default: true
    },
    mytextLign: {
      type: String,
      default: 'center'
    }

  },
  data() {
    return {
      textaLign: this.mytextLign
    };
  },
  computed: {

  },
  methods: {
    close() {
      this.$emit('close');
    }
  }
};
</script>
<style scoped>
</style>
